<script setup>
import { onMounted, onUnmounted } from "vue";
import router from "@/router/index";
import { _$, $ } from "./detail";

onMounted(() => {
  _$.requestParam.id = router.currentRoute.value.query.id;
  $.loadDetail();
});

onUnmounted(() => {
  $.clean();
});
</script>

<template>
  <el-space direction="vertical" fill wrap class="w-fill" :size="20">
    <el-page-header @back="router.back()">
      <template #content>
        <span class="text-large font-600 mr-3"> 资讯详情 </span>
      </template>
    </el-page-header>
    <el-card class="w-fill" shadow="never">
      <h2 style="text-align: center; line-height: 100px">
        {{ _$.responseParam.title }}
      </h2>
      <el-text type="info" v-html="_$.responseParam.text"></el-text>
      <div
        style="margin-top: 40px; display: flex; justify-content: space-between"
      >
        <el-text type="info">关键词：{{ _$.responseParam.typeName }}</el-text>
        <el-text type="info">发布日期：{{ _$.responseParam.cdate }}</el-text>
      </div>
    </el-card>
  </el-space>
</template>

<style scoped></style>
